using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class FMS_SubjectTemplateItemMap : EntityTypeConfiguration<FMS_SubjectTemplateItem>
	{
		public FMS_SubjectTemplateItemMap()
		{
			// Primary Key
			this.HasKey(t => t.ID);

			// Properties
			this.Property(t => t.Description)
				.HasMaxLength(100);
				
			// Table & Column Mappings
			this.ToTable("FMS_SubjectTemplateItem");
			this.Property(t => t.ID).HasColumnName("ID");
			this.Property(t => t.SID).HasColumnName("SID");
			this.Property(t => t.PID).HasColumnName("PID");
			this.Property(t => t.Fee).HasColumnName("Fee");
			this.Property(t => t.Description).HasColumnName("Description");
			this.Property(t => t.CreateUser).HasColumnName("CreateUser");
			this.Property(t => t.UpdateUser).HasColumnName("UpdateUser");
			this.Property(t => t.CreateTime).HasColumnName("CreateTime");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
			this.Property(t => t.IsDelete).HasColumnName("IsDelete");
			this.Property(t => t.CreateDeptId).HasColumnName("CreateDeptId");
			this.Property(t => t.UpdateDeptId).HasColumnName("UpdateDeptId");
			this.Property(t => t.UnitPrice).HasColumnName("UnitPrice");
			this.Property(t => t.Amount).HasColumnName("Amount");
		}
	}
}

